<?php 
	require_once("../_inc/sessions.php");
	require_once("../_inc/functions.php");
	require_once("../_inc/connection.php");
	require_once("../_inc/header.php"); 
?>
<div id="content">
	<?php
		$sessions = array("user_id","email","staff_id","recruiter_id","seeker_id","admin_id","welcome");
		foreach ($sessions as $value) { unset($_SESSION[$value]); }
	?>
	<div id="login" class="standard_form">
		<form id="login_form" action="/session" method="post" onsubmit="return false;">
		<div class="error_box" id="login_failed" style="display:none; position:absolute;">ชื่อล๊อกอิน หรือ รหัสผ่านไม่ถูกต้องค่ะ กรุณาลองใหม่</div>
		<label for="login_field">Username<br />
		  <input class="text" id="login_field" name="login" style="width: 25em;" tabindex="1" type="text" value="" autocomplete="off"/>
		</label>
		<label for="password_field">Password<br />
		  <input class="text" id="password_field" name="password" style="width: 25em;" tabindex="2" type="password" value="" />
		</label>
		<label for="user_submit">
		  <input id="user_submit" name="submit" tabindex="3" class='submit' type="submit" value="Login" />
		</label>
		<?php
			if (isset($_SESSION['request_from'])) {
				echo "
					<input type=\"hidden\" id=\"request_from\" value=\"{$_SESSION['request_from']}\">
					
				";
			}
		
		?>
		</form>
		<?php

			$sessions = array("recruiter_require","seeker_require","request_from");
			foreach ($sessions as $value) { unset($_SESSION[$value]); }
		?>

	</div>
</div>

<?php require_once("../_inc/footer.php"); ?>